package com.zhiyizhen.handheld.component.execute.api;

import com.zhiyizhen.handheld.component.execute.bean.ChargeRecordBean;
import com.zhiyizhen.handheld.component.execute.bean.ExecuteRecordBean;
import com.zhiyizhen.handheld.component.execute.bean.executedetail.ExecuteDetailBean;
import com.zhiyizhen.handheld.component.execute.bean.ExecuteUserBean;
import com.zhiyizhen.handheld.component.execute.bean.req.AddExecRecordReq;
import com.zhiyizhen.handheld.component.execute.bean.req.AddInfusionFeeReq;
import com.zhiyizhen.handheld.component.execute.bean.req.UpdateExecRecordReq;
import com.zhiyizhen.handheld.net.response.ResponseData;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

public interface IExecuteService {

    /**
     * 执行：获取执行单列表
     */
    @GET("/web/order/exec/getExecList")
    Observable<ResponseData<List<ExecuteUserBean>>> getExecList(@Header("token") String token, @Header("clinicId") String clinicId, @QueryMap Map<String, Object> params);

    /**
     * 查询执行单详情
     */
    @GET("/web/order/exec/getExecDetail")
    Observable<ResponseData<ExecuteDetailBean>> getExecDetail(@Header("token") String token, @Header("clinicId") String clinicId, @Query("orderId") String orderId);

    /**
     * 执行：获取执行历史记录
     */
    @GET("/web/order/exec/getRecordList")
    Observable<ResponseData<List<ExecuteRecordBean>>> getRecordList(
            @Header("token") String token,
            @Header("clinicId") String clinicId,
            @Query("orderId") String orderId,
            @Query("pageNo") int pageNo,
            @Query("pageSize") int pageSize
    );

    /**
     * 查询收费记录
     * @param token
     * @param clinicId
     * @param orderId
     * @return
     */
    @GET("/web/order/exec/getChargeList")
    Observable<ResponseData<List<ChargeRecordBean>>> getChargeList(
            @Header("token") String token,
            @Header("clinicId") String clinicId,
            @Query("orderId") String orderId
    );

    /**
     * 执行：添加执行记录
     */
    @POST("/web/order/exec/addExecRecord")
    Observable<ResponseData<String>> addExecRecord(@Header("token") String token, @Header("clinicId") String clinicId, @Body AddExecRecordReq addExecRecordReq);

    /**
     * 执行：修改执行记录
     */
    @POST("/web/order/exec/updateExecRecord")
    Observable<ResponseData<String>> updateExecRecord(@Header("token") String token, @Header("clinicId") String clinicId, @Body UpdateExecRecordReq updateExecRecordReq);

    /**
     * 执行：添加注射费
     */
    @POST("/web/order/exec/addInfusionFee")
    Observable<ResponseData<String>> addInfusionFee(@Header("token") String token, @Header("clinicId") String clinicId, @Body AddInfusionFeeReq addInfusionFeeReq);


}
